package visitorPattern;

public class Client {

    public static void main(String[] args) {
        // 环境，环境中有的元素
        Home home = new Home();
        home.add(new Dog());
        home.add(new Cat());

        // 访问者
        Owner owner = new Owner();
        home.action(owner);

    }
}
